package android.Spider;

import java.util.ArrayList;

import android.content.Intent;
import android.view.View;
import android.widget.ListView;

public class MessageBoard extends PictureConnectionListActivity
{
	public final static String s_strTopic = "Topic";

	@Override
	void InitConnection() {
        m_connection = null;
	}

	@Override
	void InitListAdapter() {
		super.InitListAdapter();
		
		ArrayList<ListItem> lstItems = new ArrayList<ListItem>(5);
		for (int i = 0; i < 7; ++i)
		{
			ListItem item = new ListItem();
			item.m_strDesc = arrTitle[i];
			item.m_strFineDesc = arrDesc[i];
			item.m_bmpPicture = getResources().getDrawable(arrPictures[i]);
			lstItems.add(item);
		}
		
		SetListItems(lstItems);
	}
	
	@Override
	protected void onListItemClick(ListView l, View v, int position, long id) {
		super.onListItemClick(l, v, position, id);
		Intent intent = new Intent(this, MessageTopic.class);
		intent.putExtra(s_strTopic, position);
		startSubActivity(intent, 0);
	}

	private final String arrTitle[] = {
			"Entertainment",
			"Sport & Health",
			"Fashion & Shopping",
			"Technology",
			"Celebrity",
			"Politics",
			"Miscelenious"
	};
	
	private final String arrDesc[] = {
			"Movies, music, games, etc.",
			"Topics regarding sport events",
			"Opinions about fashion",
			"Hardware, software and other tech topics",
			"Personal opinions about celebrities",
			"Political views",
			"Topics not covered by any other"
	};
	
	private final int arrPictures[] = {
		R.drawable.entertainment,
		R.drawable.sport,
		R.drawable.fashion,
		R.drawable.tech,
		R.drawable.celebrity,
		R.drawable.politics,
		R.drawable.misc
	};
}
